package apiday02;

import Day05.MaxOfArray;

import java.awt.datatransfer.StringSelection;
import java.util.Arrays;

public class exercise {
//    [a-z]
//    [A-Z]
//    [0-9]
//    [a-zA-z]
//    [a-zA-z0-9]
//    [abc]
//    [^abc]
//    [a-z&&[^b-h]]
//:表示任意一个字符,没有范围限制
//\d:表示任意一个数字,等同于[0-9]
//\w:表示任意一个单词字符,等同于[a-zA-Z0-9_]--单词字符指字母、数字和_
//\s:表示任意一个空白字符
//\D:不是数字
//\W:不是单词字符
//\S:不是空白字符
public static void main(String[] args) {
    /*
    String str = "LJ2484593794@qq.com";
    String eml = "[a-zA-Z0-9_]+@[a-zA-Z0-9]+(\\.[a-zA-Z]+)+";
    boolean match = str.matches(eml);
    if (match) {
        System.out.println("匹配成功");
    } else {
        System.out.println("匹配失败");
    }
     */
    /*
    String str = "abc123def456";
    str=str.replaceAll("[a-z]+","#AVBD#");
    System.out.println(str);

    String i="我操你妈,sb吧";
    i=i.replaceAll("[操你妈|sb]","*");
    System.out.println(i);
     */
    /*
    String str = "abc123def456";
    String[] str1=str.split("[a-z]+");
    System.out.println(Arrays.toString(str1));
     */
    /*
    obj o = new obj(1, 2);
    System.out.println(o);
    System.out.println(o.toString());
    String s = "这是:"+o;
    System.out.println(s);
     */
    /*
    obj a=new obj(1,2);
    obj b=new obj(1,2);
    System.out.println(a.equals(b));
    String s =new String("Hello");
    String t =new String("Hello");
    System.out.println(s.equals(t));
    StringBuilder ss = new StringBuilder("Hello");
    StringBuilder tt = new StringBuilder("Hello");
    System.out.println(ss.equals(tt));
     */
    /*
    Integer i = new Integer(1);
    Integer j = new Integer(1);
    System.out.println(i==j);
    System.out.println(i.equals(j));
    Double d = new Double(1.0);
    Double e = new Double(1.0);
    System.out.println(d==e);
    System.out.println(d.equals(e));
     */
    /*
    Integer a=5;
    int b=a;
    int c=a+b;
    System.out.println(c);
    Integer d=b+c;
    System.out.println(d);
     */
    /*
    String a="123";
    int b=Integer.parseInt(a);
    System.out.println(b);
    String d="123.99";
    double c=Double.parseDouble(d);
    System.out.println(c);
     */
    /*
    String a=String.valueOf(123);
    String b=String.valueOf(123);
    System.out.println(a==b);
    System.out.println(a.equals(b));
     */
    /*
    int max=Integer.MAX_VALUE;
    int min=Integer.MIN_VALUE;
    System.out.println("最大"+max+"最小"+min);

    long max1=Long.MAX_VALUE;
    long min1=Long.MIN_VALUE;
    System.out.println("最大"+max1+"最小"+min1);
     */
    }
}

